﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{   
    [Serializable]
    public class PID{
    //    private int index;
        private string drawingNum;
        private string title;
    //    private string version;

        public PID(string drawingNum, string title){
    //        this.index = index;
            this.drawingNum = drawingNum;
            this.title = title;
      //      this.version = version;
        }

        public PID(){}
//
//        public int Index{
//            get { return index; }
//            set { index = value; }
//        }

        public string DrawingNum{
            get { return drawingNum; }
            set { drawingNum = value; }
        }

        public string Title{
            get { return title; }
            set { title = value; }
        }

//        public string Version{
//            get { return version; }
//            set { version = value; }
//        }

        public override bool Equals(object obj){
            if(obj != null && obj is PID){
                PID p = (PID) obj;
                if (this.title == p.title && this.drawingNum == p.drawingNum)
                    return true;
            }
            return false;
        }
    }
}
